<?php
require('conn.php');
require('functions.php');

$uid=guolv($_GET['uid']);
$type=$_GET['type'];
setcookie("tjd",$uid, time()+3600);//1小时
if(is_numeric($uid)==false){
    $uid='';
}
?>
<!doctype html>
<html>
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
    <title><?php echo $config['sitename']?></title>
    <meta name="keywords" content="<?php echo $config['sitename']?>,转发" />
    <meta name="description" content="<?php echo $config['sitename']?>邀请好友转发就赚钱。">
<link href="<?php echo $site?>/static/all.css" type="text/css" rel="stylesheet" media="all">

    <!-- <link href="<?php echo $site?>/static/reset_v1.css" type="text/css" rel="stylesheet" media="all" /> -->
    <style>
        .erweima{
            width: 100%;
            height: 100%;
            margin-top: 0;
            position: absolute;
            background: url('static/images/invite_bg.png') no-repeat center 0;
            background-size: cover;
            text-align: center;
        }
        .erweima h1{ text-align:center;}
        .fenxiang {
            position: fixed;
            left: 0px;
            top: 0px;
            z-index: 9999;
            width: 100%;
            height: 100%;
            background:rgba(0, 0, 0, 0.8);
            background-size: contain;
        }
        .img1{
            padding-top: 4em;
            padding-left: 2em;
            padding-right: 2em;
            z-index: 1;
        }        
        .img2{
            width: 150px;
            z-index: 3;
        }
        .img3{
            width: 170px;
            z-index: 2;
        }
        .a-c{
            margin: auto;
            position: absolute;
            top: 40px; left: 0; bottom: 0; right: 0;
        }
        .share-img-1{
            width: 50%;
            margin-left: 50%;
        }
        .share-img-2{
            width: 50%;
            margin-left: 25%;
            margin-top: 50px;
        }
    </style>
    </head>
    <body style="font-family:'微软雅黑';margin: 0px;padding: 0px;position: absolute;top: 0;width: 100%;height: 100%;">
            <div class="fenxiang" id="fg1" onclick="z_yc()" style="display:none">
                <img class="share-img-1" src="static/images/share_arrow.png">
                <img class="share-img-2" src="static/images/share_man.png">
            </div>
            <!-- <a href="weixin://profile/gh_cff7ee818cc0" style="font-size: 50px">有条资讯</a> -->
            <?php if($type==0):?>
            <div class="erweima">
                    <img class="img1" src="static/images/invite_ad.png" alt="">
                    <img  class="img2 a-c" src='http://qr.api.cli.im/qr?data=http%253A%252F%252Fzx.admiui.com%252Freg.php%253Fuid%253D1613&level=H&transparent=false&bgcolor=%23ffffff&forecolor=%23000000&blockpixel=12&marginblock=1&logourl=&size=280&kid=cliim&key=f748a0c2d0703b246e132b9e45f6b510' alt='在线二维码生成器' />
                    <img class="img3 a-c" src="static/images/invite_b.png" alt="">
                    <p  style="border-radius: 5px;text-align:center;font-size:1.2em;line-height: 40px;width: 70%;margin-left: 15%;background-color: #fed517;box-shadow:0px 5px 5px #eea415;-webkit-box-shadow:0px 5px 1px #eea415;position:absolute;bottom: 15%;"><a style="color:#7f2709;text-decoration: none;" href="javascript:void(0);" onclick="z_fx();">点击分享给你的小伙伴吧！</a></p>
            </div>
            <?php else:?>
            <div class="erweima">
                    <p  style="border-radius: 5px;text-align:center;font-size:1.2em;line-height: 40px;width: 70%;margin-left: 15%;background-color: #fed517;box-shadow:0px 5px 5px #eea415;-webkit-box-shadow:0px 5px 1px #eea415;position:absolute;top: 15%;"><a style="color:#7f2709;text-decoration: none;" href="javascript:void(0);" onclick="z_fx();">长按二维码或者扫一扫关注公众号,公众号里为您提供了更便捷的操作</a></p>
                    <img  class="img2 a-c" src="static/images/code.jpg" />
                    <img class="img3 a-c" src="static/images/invite_b.png" alt="">
            </div>
            <?php endif;?>
                <br><br><br><br>
            <div class="positionFooter">
              <ul style="height:100%;">
                <li><a class="a4" href="<?php echo $site?>/ucenter.php"></a></li>   
                <li><a class="a2" href="<?php echo $site?>/list.php?uid=<?php echo $_uid?>"></a></li>
                <li><a class="a3" href="<?php echo $site?>/news.php?type=1"></a></li>
              </ul>
            </div>
            <script type="text/javascript" src="static/zepto.js" ></script>
            <script>
                function z_yc(){
                    $("#fg1").css("display","none");
                }
                function z_fx(){
                    $("#fg1").css("display","");
                }
            </script>            
            <script>
                $(document).ready(function(){
                    if (window.location.hash) {
                        $('.positionFooter').hide();
                    }else{
                        $('.positionFooter').show();
                        window.location.hash = 'shared';
                    }
                });
            </script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
wx.config({
debug: false,
appId: 'wx32030c7338f2496d',
timestamp: 1452005256,
nonceStr: 'XXCYU21W7KgvSHPe',
signature: '4e0b4a0453f467995820e2b13ca8692e7d08c618',
jsApiList: [  //需要使用的网页服务接口
         'checkJsApi',  //判断当前客户端版本是否支持指定JS接口
         'onMenuShareTimeline', //分享给好友
         'onMenuShareAppMessage', //分享到朋友圈
         'onMenuShareQQ',  //分享到QQ
         'onMenuShareWeibo' //分享到微博
         ]
});
wx.ready(function () {
wx.onMenuShareTimeline({  //例如分享到朋友圈的API  
   title: '有条资讯，一个可以赚钱的资讯平台！', // 分享标题
   link: 'http://zx.admiui.com/reg.php?uid=<?php echo $uid?>', // 分享链接
   imgUrl: 'static/images/logo.png', // 分享图标
   success: function () {

   },
   cancel: function () {
       
   }
});

wx.onMenuShareAppMessage({
    title: '有条资讯！', // 分享标题
    desc: '有条资讯，一个可以赚钱的资讯平台', // 分享描述
    link: 'http://zx.admiui.com/reg.php?uid=<?php echo $uid?>', // 分享链接
    imgUrl: 'static/images/logo.png', // 分享图标
    type: 'link', // 分享类型,music、video或link，不填默认为link
    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
    success: function () { 
        // 用户确认分享后执行的回调函数
    },
    cancel: function () { 
        // 用户取消分享后执行的回调函数
    }
});

});
</script>
    </body>
</html>